package facade.cinema.facade;

import facade.cinema.subsystem.DVDPlayer;
import facade.cinema.subsystem.PopcornMachine;
import facade.cinema.subsystem.Projector;

public class CinemaFacade {

    private DVDPlayer dvdPlayer;
    private PopcornMachine popcornMachine;
    private Projector projector;

    public CinemaFacade() {
        this.dvdPlayer = DVDPlayer.getInstance();
        this.popcornMachine = PopcornMachine.getInstance();
        this.projector = Projector.getInstance();
    }



    public void ready() {
        popcornMachine.on();
        popcornMachine.pop();
        projector.on();
        dvdPlayer.on();
    }

    public void play() {
        dvdPlayer.play();
    }

    public void pause() {
        dvdPlayer.pause();
    }

    public void end() {
        popcornMachine.off();
        projector.off();
        dvdPlayer.off();
    }

}
